-- card: 15584 from stack: in.0-2 -- bmap block id: 16078 -- flags: 0000 -- background id: 15301 -- name: scripting.1 -- part 2 (button) -- low flags: 00 -- high flags: A003 -- rect: left=73 top=211 right=233 bottom=163 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: A button ----- HyperTalk script ----- on mouseUp repeat 4 times beep end repeat end mouseUp -- part 3 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=202 top=264 right=294 bottom=262 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- -- This handler displays a script and sets the btn script to this -- script, so the user can see how different scripts work. on mouseUp displayText 2 put cd fld "textDisplay" into theScript set the script of btn "a button" to theScript end mouseUp -- part 4 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=268 top=264 right=294 bottom=327 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- -- This handler displays a script and sets the button script to that -- script, so the user can see how different scripts work. on mouseUp displayText 3 put cd fld "textDisplay" into theScript set the script of btn "a button" to theScript end mouseUp -- part 5 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=333 top=264 right=294 bottom=392 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- -- This handler displays a script and sets the button script to that -- script, so the user can see how different scripts work. on mouseUp displayText 4 put cd fld "textDisplay" into theScript set the script of btn "a button" to theScript end mouseUp -- part 7 (field) -- low flags: 80 -- high flags: 0007 -- rect: left=53 top=60 right=236 bottom=419 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: text -- part 9 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=171 top=183 right=258 bottom=391 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: textDisplay -- part 10 (field) -- low flags: 81 -- high flags: 2004 -- rect: left=115 top=109 right=240 bottom=349 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 174 -- text size: 18 -- style flags: 256 -- line height: 24 -- part name: pop up field -- part contents for card part 7 ----- text ----- [1] on mouseUp visual iris open slow go card "xray face" visual barn door close go card "scripting.1" end mouseUp [2] on mouseUp repeat 8 times set the hilite of button "A button" to true set the hilite of button "A button" to false end repeat end mouseUp [3] on mouseUp show card field "pop up field" wait 2 seconds hide card field "pop up field" end mouseUp [4] on mouseUp repeat 4 times beep end repeat end mouseUp [5] -- part contents for card part 9 ----- text ----- on mouseUp repeat 4 times beep end repeat end mouseUp -- part contents for card part 10 ----- text ----- H E L L O ! I am a “pop up field.” -- part contents for background part 1 ----- text ----- Scripts are the commands that tell the components of HyperCard what to do. In the box below is the script for “A button.” Read the script to see if you can figure out what will happen when you click the button, then click the button. The other buttons below will change the script, and make “A button” do other things.